package com.ruoyi.loginfo.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.loginfo.mapper.LogPersonMapper;
import com.ruoyi.loginfo.domain.LogPerson;
import com.ruoyi.loginfo.service.ILogPersonService;

/**
 * 快递员Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-15
 */
@Service
public class LogPersonServiceImpl implements ILogPersonService 
{
    @Autowired
    private LogPersonMapper logPersonMapper;

    /**
     * 查询快递员
     * 
     * @param id 快递员主键
     * @return 快递员
     */
    @Override
    public LogPerson selectLogPersonById(Long id)
    {
        return logPersonMapper.selectLogPersonById(id);
    }

    /**
     * 查询快递员列表
     * 
     * @param logPerson 快递员
     * @return 快递员
     */
    @Override
    public List<LogPerson> selectLogPersonList(LogPerson logPerson)
    {
        return logPersonMapper.selectLogPersonList(logPerson);
    }

    /**
     * 新增快递员
     * 
     * @param logPerson 快递员
     * @return 结果
     */
    @Override
    public int insertLogPerson(LogPerson logPerson)
    {
        logPerson.setCreateTime(DateUtils.getNowDate());
        return logPersonMapper.insertLogPerson(logPerson);
    }

    /**
     * 修改快递员
     * 
     * @param logPerson 快递员
     * @return 结果
     */
    @Override
    public int updateLogPerson(LogPerson logPerson)
    {
        return logPersonMapper.updateLogPerson(logPerson);
    }

    /**
     * 批量删除快递员
     * 
     * @param ids 需要删除的快递员主键
     * @return 结果
     */
    @Override
    public int deleteLogPersonByIds(Long[] ids)
    {
        return logPersonMapper.deleteLogPersonByIds(ids);
    }

    /**
     * 删除快递员信息
     * 
     * @param id 快递员主键
     * @return 结果
     */
    @Override
    public int deleteLogPersonById(Long id)
    {
        return logPersonMapper.deleteLogPersonById(id);
    }
}
